GtkWidget: Update GtkStyleContext animation regions on allocation change.
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 19 Aug 2010 20:42:16 +0000 (22:42 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:38:08 +0000 (15:38 +0100)
gtk/gtkwidget.c

index 6321348ea2ca9c5acb8c3e72734b891e0977a39f..22f3bf2feed9761a4b7eb978f4c40a198fac056f 100644 (file)
@@ -4660,6 +4660,14 @@ gtk_widget_size_allocate (GtkWidget      *widget,
              cairo_region_destroy (invalidate);
            }
        }
+
+      if (size_changed || position_changed)
+        {
+          GtkStyleContext *context;
+
+          context = gtk_widget_get_style_context (widget);
+          _gtk_style_context_invalidate_animation_areas (context);
+        }
     }
 
   if ((size_changed || position_changed) && priv->parent &&
@@ -5632,6 +5640,7 @@ gtk_widget_send_expose (GtkWidget *widget,
   cairo_t *cr;
   int x, y;
   gboolean do_clip;
+  GtkStyleContext *context;
 
   g_return_val_if_fail (GTK_IS_WIDGET (widget), TRUE);
   g_return_val_if_fail (gtk_widget_get_realized (widget), TRUE);
@@ -5656,6 +5665,9 @@ gtk_widget_send_expose (GtkWidget *widget,
   gtk_cairo_set_event (cr, NULL);
   cairo_destroy (cr);
 
+  context = gtk_widget_get_style_context (widget);
+  _gtk_style_context_coalesce_animation_areas (context);
+
   return result;
 }